#include <iostream>
#include <iomanip>
using namespace std;
double f(int a);
int z(int b);
int main()
{cout<<"n"<<" "<<"e"<<endl;
 cout<<"-"<<" "<<"-----------"<<endl;
 cout<<"0"<<" "<<"1"<<endl;
 cout<<"1"<<" "<<"2"<<endl;
 for(int i=2;i<=9;i++)
    {cout<<i<<" "<<setprecision(10)<<f(i)<<endl;} 
 system ("pause");
 return 0;
}

double f(int a)
{double k=2.0;
 for(int i=2;i<=a;i++)
   {k=k+1.0/z(i);}
 return k;
}

int z(int i)
{int c=1;
 for (int h=1;h<=i;h++) 
     c=h*c;
 return c;
}
    
